/**
 * Copyright (C) 2009+ Spark Zheng
 *
 * @file        src/dserver_log.h 
 * @date        2010-04-05
 * @brief	server_framework
 * @see         dserver
 * @history
 */

#ifndef _DSERVER_LOG_H
#define _DSERVER_LOG_H

#ifdef __cplusplus
extern "C" {
#endif

#include <dlib/log.h>

/** server name version */
#define DSERVER_VERSION		"0.2.0"
#define DSERVER_NAME		"dserver"

/** common module dlog control */
#define DSERVER_DATASTREAM_NEED_DLOG
#define DSERVER_NETWORK_NEED_DLOG

#define DSERVER_FILTER_NEED_DLOG
#define DSERVER_PROTOCOL_NEED_DLOG

/** server log method */
#define LOG_IDENT		DSERVER_NAME
enum {
	LOG_MAIN = 0,	/* main flow */
	LOG_MONT,	/* monitor flow */
	LOG_PROT,	/* loaded protocols flow */
	LOG_FILT,	/* filter flow */
	LOG_NUM
};

/**
 * dserver_log_init
 * @brief init global log struct
 * @param log_path: log-files dir
 */
extern int dserver_log_init(const char *log_path);

/**
 * dserver_log_exit
 * @brief destroy global log struct
 */
extern void dserver_log_exit(void);

#ifdef __cplusplus
}
#endif
#endif
